import { onBeforeUnmount,ref } from 'vue'
export default function useTime(){
 const count = ref(1)
 const time = setInterval(()=>{
     console.log(count.value++)
 },1000)
 onBeforeUnmount(()=>{
     clearInterval(time)
 })

}
